package com.worldcup.dao;

import com.worldcup.model.Country;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author duwan.zq
 */
@Mapper
@Repository
public interface CountryMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Country record);

    int insertSelective(Country record);

    int updateByPrimaryKeySelective(Country record);

    int updateByPrimaryKey(Country record);

    /**
     * select by id
     * @param id
     * @return
     */
    Country selectByPrimaryKey(Integer id);

    /**
     * select by group
     * @param groupName
     * @return
     */
    List<Country> selectByGroupName(@Param("groupName") String groupName);

    /**
     * 支持
     * @param id
     */
    void addSupportNum(Integer id);

    /**
     * select by name
     * @param name
     * @return
     */
    Country selectByName(@Param("teamName") String name);

    /**
     * limit
     * @param limit
     * @return
     */
    List<Country> selectLimit(@Param("limit") Integer limit);
}